<?php
class c_food extends Controller {

	function c_food() {
		parent::Controller();	
	}

	function index() {
		$this->load->view('welcome_message');
	}

	function add() {
		$data = array(
			'to_do' => 'view food taste',
			'current_date' => date('r')
		);
		$this->m_xrvel_scaffolding_var->set_item('view_data', $data);
		$this->m_xrvel_scaffolding_var->set_item('view_template', 'template_sample');
		$this->m_xrvel_scaffolding->add('foods');
	}

	function delete() {
		$data = array(
			'to_do' => 'view food taste',
			'current_date' => date('r')
		);
		$this->m_xrvel_scaffolding_var->set_item('view_data', $data);
		$this->m_xrvel_scaffolding_var->set_item('view_template', 'template_sample');
		$this->m_xrvel_scaffolding->delete('foods', $this->uri->segment(3), '/'.$this->uri->segment(1).'/view/');
	}

	function edit() {
		$data = array(
			'to_do' => 'view food',
			'current_date' => date('r')
		);
		$this->m_xrvel_scaffolding_var->set_item('view_data', $data);
		$this->m_xrvel_scaffolding_var->set_item('view_template', 'template_sample');
		$this->m_xrvel_scaffolding->edit('foods', $this->uri->segment(3));
	}

	function view() {
		$data = array(
			'to_do' => 'view food',
			'current_date' => date('r')
		);
		$this->m_xrvel_scaffolding_var->set_item('view_data', $data);
		$this->m_xrvel_scaffolding_var->set_item('view_template', 'template_sample');
		$this->m_xrvel_scaffolding->view('foods');
	}
}
?>